import request from '@/common/request/ajaxRequest'
export const getBaseUserinfo = (data) => {
  return request({
    url: '/adsApi/base/userinfo',
    method: 'get',
    params:data
  })
}
// 绑定用户
export const PostOauthToken = (data) => {
  return request({
    url: '/oauth/token',
    method: 'post',
    data:data
  })
}
// 绑定用户
export const PostbindUser = (data) => {
  return request({
    url: '/upms/openapi/wx/mini/bind/user',
    method: 'post',
    data:data
  })
}
// 获取绑定状态
export const PostbindStatus = (data) => {
  return request({
    url: '/upms/openapi/wx/mini/bind/status',
    method: 'post',
    data:data
  })
}
// 解密微信
export const PostcodeTsession = (data) => {
  return request({
    url: '/upms/openapi/wx/mini/code2session',
    method: 'post',
    data:data
  })
}
// code转session接口
export const PostuserinfoDecrypt = (data) => {
  return request({
    url: '/upms/openapi/wx/mini/userinfo/decrypt',
    method: 'post',
    data:data
  })
}

// 获取验证码
export const PostsendSms = (phone) => {
  return request({
    url: '/adsApi/ads/sendSms',
    method: 'post',
    data:{
		phone:phone
	}
  })
}
export const achievePage = (data) => {
  return request({
    url: '/adsApi/ads/achieve/page',
    method: 'get',
    params:data
  })
}
export const getRequirePage = (data) => {
  return request({
    url: '/adsApi/ads/require/page',
    method: 'get',
    params:data
  })
}
export const PostCooperationSave = (data) => {
  return request({
    url: '/adsApi/ads/cooperation/save',
    method: 'post',
    data:data
  })
}
export const codeLogin = (data) => {
  return request({
    url: '/adsApi/api/app/login',
    method: 'get',
    params:data
  })
}
// 获取手机号
export const getMobilePhone = (data) => {
  return request({
    url: '/adsApi/api/app/getMobilePhone',
    method: 'get',
    params:data
  })
}
//资源报告
export const getResReportPage = (data) => {
  return request({
    url: '/adsApi/api/appResReport/selectReportType',
    method: 'get',
    params:data
  })
}
//资源详情
export const getResourceDetails = (data) => {
  return request({
    url: '/adsApi/api/appResReport/resourceDetails',
    method: 'get',
    params:data
  })
}
/*公用收藏接口
"state": "0", //0:收藏 ，1取消收藏
"dataId": "1", //收藏的数据id
"dataType": "2", //数据类型：企业收藏-1；资源收藏-2；锂讯（进出口）收藏-3；锂讯（统计数据）收藏-4
"openId": "123456" //登录用户的openId
*/
export const saveOrDeleteCollection = (data) => {
  return request({
    url: '/api/appResReport/saveOrDeleteCollection',
    method: 'post',
    data:data
  })
}
// 产量资讯
export const getProductionInformation = (data) => {
  return request({
    url: '/api/appResReport/productionInformation',
    method: 'get',
    params:data
  })
}
// 进出口资讯
export const getImportsAndExports = (data) => {
  return request({
    url: '/api/appResReport/importsAndExports',
    method: 'get',
    params:data
  })
}
// 统计数据
export const getStatisticalDataList = (data) => {
  return request({
    url: '/api/appResReport/statisticalDataList',
    method: 'get',
    params:data
  })
}
// 价格详情
export const getDetailedPrice = (data) => {
  return request({
    url: '/api/AppNewsPrice/detailedPrice',
    method: 'get',
    params:data
  })
}
// 行业热点
export const getRecommend = (data) => {
  return request({
    url: '/api/pub/recommend.ldPolicyList',
    method: 'post',
    data:data
  })
}
// 价格趋势图
export const getPriceChart = (data) => {
  return request({
    url: '/api/AppNewsPrice/materialDetailedPrice',
    method: 'get',
    params:data
  })
}
// 地图数据
export const getMapdata = (data) => {
  return request({
    url: '/api/hot/map',
    method: 'get',
    params:data
  })
}
// 二级指标
export const getCommonData = (data) => {
  return request({
    url: '/api/pub/getCommonData',
    method: 'get',
    params:data
  })
}
// 二级指标柱图
export const getCommonBar = (data) => {
  return request({
    url: '/api/pub/getCommonData',
    method: 'get',
    params:data
  })
}
// 图表数据
export const getBarData = (data) => {
  return request({
    url: '/api/dj/getBarData',
    method: 'get',
    params:data
  })
}

// 图表数据-1
export const getPieData = (data) => {
  return request({
    url: '/api/dj/getPieData',
    method: 'get',
    params:data
  })
}
// 主要政策
export const getZhengceData = (data) => {
  return request({
    url: '/api/dj/zhengce',
    method: 'get',
    params:data
  })
}
// 市场行情
export const marketConditionList = (data) => {
  return request({
    url: '/api/app/marketConditionList',
    method: 'get',
    params:data
  })
}
// 进出口详情
export const importsExportsDetailed = (data) => {
  return request({
    url: '/api/app/importsExportsDetailed',
    method: 'get',
    params:data
  })
}
// 收藏列表
export const personalCollectionList = (data) => {
  return request({
    url: '/api/App/personalCollectionList',
    method: 'get',
    params:data
  })
}
// 企业匹配查询
export const getAppGovCompanyList = (data) => {
  return request({
    url: '/api/app/appGovCompanyList',
    method: 'get',
    params:data
  })
}
// 政企详情
export const appGovCompanyDetails = (data) => {
  return request({
    url: '/api/app/appGovCompanyDetails',
    method: 'get',
    params:data
  })
}
// 今日快讯
export const getDayInfoList = (data) => {
  return request({
    url: '/api/appIndex/dayInfoList',
    method: 'get',
    params:data
  })
}
// 今日快讯详情
export const getDayInfoDetail = (data) => {
  return request({
    url: '/api/appIndex/dayInfoDetail',
    method: 'get',
    params:data
  })
}
// 数据详情
export const getCommonDataTable = (data) => {
  return request({
    url: '/api/pub/getCommonData',
    method: 'get',
    params:data
  })
}
// 本月资讯
export const getMonthInfoList = (data) => {
  return request({
    url: '/api/appIndex/monthInfoList',
    method: 'get',
    params:data
  })
}
// 本月资讯详情
export const getMonthInfoDetail = (data) => {
  return request({
    url: '/api/appIndex/monthInfoDetail',
    method: 'get',
    params:data
  })
}
// 全局搜索
export const getAppSearch= (data) => {
  return request({
    url: '/api/appSearch',
    method: 'get',
    params:data
  })
}
